/**
 * Created by Administrator on 2017/3/27 0027.
 */
Page4= {
    Create: function () {
        var page = {};


        var map;
        map = arr_texture[21];
        var picG = new THREE.PlaneGeometry(240*0.7, 73*0.7, 1, 1);
        var picM = new THREE.MeshBasicMaterial({map: map, transparent: true, side: THREE.DoubleSide});
        var pic1 = new THREE.Mesh(picG, picM);

        map = arr_texture[22];
        var picG = new THREE.PlaneGeometry(231*0.7, 134*0.7, 1, 1);
        var picM = new THREE.MeshBasicMaterial({map: map, transparent: true, side: THREE.DoubleSide});
        var pic2 = new THREE.Mesh(picG, picM);

        map = arr_texture[23];
        var picG = new THREE.PlaneGeometry(582*0.7, 73*0.7, 1, 1);
        var picM = new THREE.MeshBasicMaterial({map: map, transparent: true, side: THREE.DoubleSide});
        var pic3 = new THREE.Mesh(picG, picM);

        map = arr_texture[24];
        var picG = new THREE.PlaneGeometry(776*0.7,84*0.7, 1, 1);
        var picM = new THREE.MeshBasicMaterial({map: map, transparent: true, side: THREE.DoubleSide});
        var pic4 = new THREE.Mesh(picG, picM);


        pic1.position.set(0, 140-40, 100);
        pic2.position.set(0, 30, 250);
        pic3.position.set(0, -70+40, 150);
        pic4.position.set(0, -170+50, 50);
        pic1.material.opacity = 0;
        pic2.material.opacity = 0;
        pic3.material.opacity = 0;
        pic4.material.opacity = 0;


        var picG=new THREE.PlaneGeometry(60,60,1,1);
        var picM=new THREE.MeshBasicMaterial({map:tip_textrue,transparent:true,side:THREE.DoubleSide});
        var pic7=new THREE.Mesh(picG,picM);
        pic7.material.opacity = 0;
        pic7.position.set(0, -250, 50);

        scene.add(pic1);
        scene.add(pic2);
        scene.add(pic3);
        scene.add(pic4);
        scene.add(pic7);

        page.start = function () {
            renderer.setClearColor(0xffffff);
            pic1.position.y += 10;
            pic2.position.y += 10;
            pic3.position.y += 10;
            pic4.position.y += 10;
            TweenMax.to(pic1.position, 0.7, {delay: 0, y: pic1.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic2.position, 0.7, {delay: 0.3, y: pic2.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic3.position, 0.7, {delay: 0.6, y: pic3.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic4.position, 0.7, {delay: 0.9, y: pic4.position.y - 10, ease: Cubic.easeOut});
            TweenMax.to(pic1.material, 0.7, {delay: 0, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic2.material, 0.7, {delay: 0.3, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic3.material, 0.7, {delay: 0.6, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic4.material, 0.7, {delay: 0.9, opacity: 1, ease: Cubic.easeOut});
            TweenMax.to(pic7.material, 0.7, {delay: 1.2, opacity: 1, ease: Cubic.easeOut});
        }
        page.end = function () {
            TweenMax.to(pic1.material, 0.6, {delay: 0.2, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic2.material, 0.6, {delay: 0.4, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic3.material, 0.6, {delay: 0.6, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic4.material, 0.6, {delay: 0.6, opacity: 0, ease: Cubic.easeOut});
            TweenMax.to(pic7.material, 0.6, {delay: 0.7, opacity: 0, ease: Cubic.easeOut});
        }



        page.DoIt=function(){
            bg.rotation.z+=0.01;
        }

        return page;

    }
}